#include "Hub.h"

Hub::Hub(HubDefine * define, FacilityDirection f_dir,Coordinate coordinate,Cargo_Manager * cargo_manager)
    :Facility(define,f_dir,coordinate,cargo_manager){}

void Hub::processCargo(){this->finishProcess();}

void Hub::finishProcess(){
    int cnt = 0;
    for(int i = 0; i < incargos.size();++i){
        if(incargos[i]) {delete incargos[i]; ++cnt;}
        incargos[i] = null;
    }
    emit Hub::store(cnt);

}

void Hub::sendCargo() {}
